/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package database;

import runtime.RuntimeInstance;
import runtime.RuntimeInstanceFactory;

/**
 *
 * @author Alejandro
 */
public class DatabaseObjectFactory implements RuntimeInstanceFactory {
    public static final String NUMBER = "DatabaseNumber";
    public static final String TEXT = "DatabaseText";
    public static final String DATE = "DatabaseDate";

    @Override
    public RuntimeInstance getObject(String typeName) {
        if (typeName.equals(NUMBER)) {
            return new DatabaseNumber();
        }
        if (typeName.equals(TEXT)) {
            return new DatabaseText();
        }
        if (typeName.equals(DATE)) {
            return new DatabaseDate();
        }
        return null;
    }

}
